package server.business.service.Impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import server.business.pojo.DonReg;
import server.business.service.DonRegService;
import server.business.mapper.DonRegMapper;

import java.util.List;

@Service("donRegService")
public class DonRegServicelmpl extends ServiceImpl<DonRegMapper, DonReg> implements DonRegService {

    @Autowired
    private DonRegMapper DonRegMapper;
    @Autowired
    private DonRegService donRegService;

    public IPage<DonReg> selectByPage(int currentPage, int pageSize){
        Page<DonReg> page = new Page<>(currentPage,pageSize);
        IPage<DonReg> sampleIpage = DonRegMapper.selectPage(page,null);
        return sampleIpage;
    }

    public List<DonReg> queryData(){
        List<DonReg> list = donRegService.list();
        return list;
    }
}
